home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Comm / www / streamer.lha / streamer / install next >
Text File  |  2004-06-15  |  7KB  |  225 lines

  1. ;
  2. ; $VER: Streamer2 installer 4
  3. ; Copyright ©2003 Brian Donahue
  4. ;
  5.  
  6. (welcome "Welcome to Streamer 2.09\n " "The MPEG and RealAudio Internet player")
  7.  
  8. (set #copyprefs 1)
  9. ;Figure out which CPU version to install
  10. (set #mycpu (database "cpu"))
  11. (set #myfpu (database "fpu"))
  12.  
  13. (if (patmatch "68000|68010" #mycpu)(exit "You need a 68020 CPU"))
  14. (if (AND (= "68020" #mycpu) 
  15.     (= #myfpu "NOFPU"))
  16.         (set #cpuchoice 0))
  17. (if (AND (= "68030" #mycpu) 
  18.     (= #myfpu "NOFPU"))
  19.         (set #cpuchoice 0))
  20. (if (AND(= "68020" #mycpu) 
  21.     (= "68881" #myfpu))
  22.         (set #cpuchoice 1))
  23. (if (AND(= "68020" #mycpu) 
  24.     (= "68882" #myfpu))
  25.         (set #cpuchoice 1))
  26. (if (AND(= "68030" #mycpu) 
  27.     (= "68881" #myfpu))
  28.         (set #cpuchoice 1))
  29. (if (AND(= "68030" #mycpu) 
  30.     (= "68882" #myfpu))
  31.         (set #cpuchoice 1))
  32. (if (AND (= "68040" #mycpu)
  33.     (= "68881" #myfpu))
  34.         (set #cpuchoice 2))
  35. (if (AND (= "68040" #mycpu)
  36.     (= "68882" #myfpu))
  37.         (set #cpuchoice 2))
  38. (if (AND (= "68040" #mycpu)
  39.     (= "FPU40" #myfpu))
  40.         (set #cpuchoice 2))
  41. (if (AND(= "68040" #mycpu)
  42.     (= #myfpu "NOFPU"))
  43.         (set #cpuchoice 0))
  44. (if (AND(= "68060" #mycpu)
  45.     (= #myfpu "NOFPU"))
  46.         (set #cpuchoice 0))
  47.  
  48. ;get languages from locale, set the default
  49.  
  50. (if (= @language "english")(set #defaultlang 1))
  51. (if  (= @language "deutsch")(set #defaultlang 2))
  52. (if (= @language "türkçe")(set #defaultlang 3))
  53. (if (= @language "polski")(set #defaultlang 4))
  54.  
  55. ; Ask stuff
  56.  
  57. (set #prog (askchoice (prompt "Which CPU version do you want to install?")
  58. (help "Choose the version closest to the CPU that you have.\nMake sure to choose the FPU version, if your Amiga is equipped with a Floating Point Unit! ")
  59. (choices "68020" "68020 + FPU" "68040 + FPU")
  60. (default #cpuchoice)))
  61.  
  62. (set #langs (askoptions (prompt "Which languages do you want to install?\n" "(English is Built-in)")
  63. (help " ")
  64. (choices "English" "Deutsch" "Türkçe" "Polski")
  65. (default #defaultlang)))
  66.  
  67. (set #progdest (askdir
  68.     (prompt "Where do you want to install the Streamer executable?")
  69.     (help " ")
  70.     (newpath)
  71.     (default "c:")
  72. ))
  73. (set #docdest (askdir
  74.     (prompt "Where do you want to install the Streamer documentation?\nA drawer called 'Streamer2-docs' will be created")
  75.     (help " ")
  76.     (newpath)
  77.     (default "HELP:english")
  78. ))
  79. (if (=(exists "ENVARC:streamerprefs.xml") 1)
  80.     (set #copyprefs (askbool (prompt "Do you want to overwrite Streamer's preferences?") (help "If you choose to overwrite, you will lose your current settings."))))
  81.  
  82. ;Copy Streamer Executable
  83.  
  84. (if (= #prog 0)(
  85. (copyfiles
  86.     (prompt        "Installing the Streamer executable")
  87.     (help        @copyfiles-help)
  88.     (source       "streamer2.020")
  89.     (dest        #progdest)
  90.     (newname "streamer2")
  91.     (optional    force askuser)
  92.     (pattern     "#?")
  93. )))
  94.  
  95. (if (= #prog 1)(
  96. (copyfiles
  97.     (prompt        "Installing the Streamer executable")
  98.     (help        @copyfiles-help)
  99.     (source       "streamer2.020FPU")
  100.     (dest        #progdest)
  101.     (newname "streamer2")
  102.     (optional    force askuser)
  103.     (pattern     "#?")
  104. )))
  105. (if (= #prog 2)(
  106. (copyfiles
  107.     (prompt        "Installing the Streamer executable")
  108.     (help        @copyfiles-help)
  109.     (source       "streamer2.040FPU")
  110.     (dest        #progdest)
  111.     (newname "streamer2")
  112.     (optional    force askuser)
  113.     (pattern     "#?")
  114. )))
  115.  
  116. ; Copy Streamer Icon
  117.  
  118. (copyfiles
  119.     (prompt        "Installing the Streamer icon")
  120.     (help        @copyfiles-help)
  121.     (source       "streamer2.info")
  122.     (dest        #progdest)
  123.     (optional    force askuser)
  124.     (pattern     "#?")
  125. )
  126.  
  127. ;Copy the prefs file
  128. (if (= #copyprefs 1)(
  129. (textfile (dest "streamerprefs.xml")
  130.           (append "<STREAMER VERSION=\"$VER: 2.07\">\n")
  131.           (append "\t<PROGRAM>\n")
  132.           (append "\t\t<PUBSCREEN></PUBSCREEN>\n")
  133.           (append "\t\t<PLSDIR></PLSDIR>\n")
  134.           (append "\t\t<PLAYMODE>ASKREC</PLAYMODE>\n")
  135.           (append "\t\t<PROXYHOST></PROXYHOST>\n")
  136.           (append "\t\t<PROXYPORT>8000</PROXYPORT>\n")
  137.           (append "\t\t<BWLIMIT>32</BWLIMIT>\n")
  138.           (append "\t\t</PROGRAM>\n")
  139.           (append "<MPEG>\n\t<PLAYER>INTERNAL</PLAYER>\n\t\t<EXTERNALPLAYER>c:mpega -r</EXTERNALPLAYER>\n\t\t<QUALITY>BEST</QUALITY>\n\t\t<FDIV>2</FDIV>\n\t\t<AHIUNIT>2</AHIUNIT>\n\t\t<MIXFREQ>48000</MIXFREQ>\n\t\t<RECMODE>STREAM</RECMODE>\n\t\t<MP3DIR></MP3DIR>\n\t</MPEG>\n\t<REALAUDIO>\n\t\t<PLAYER>INTERNAL</PLAYER>\n\t\t<EXTERNALPLAYER>c:raplay</EXTERNALPLAYER>\n\t\t<AHIUNIT>2</AHIUNIT>\n\t</REALAUDIO>\n</STREAMER>\n")
  140. (append "<STATE>\n\t<HELPLOCATION>") 
  141. (append (tackon #docdest "Streamer2-docs/streamer.html"))
  142. (append "</HELPLOCATION>\n\t</PROGRAM>\n")
  143. (append "\t\t<VOLUME>100</VOLUME>\n\t\t<BALANCE>50</BALANCE>\n</STATE>\n"))
  144.  
  145. (copyfiles
  146.     (prompt        "Copying default preferences file")
  147.     (help        @copyfiles-help)
  148.     (source       "streamerprefs.xml")
  149.     (dest        "ENV:")
  150.     (optional    force askuser)
  151.     (pattern     "#?")
  152. )
  153. (copyfiles
  154.     (prompt        "Copying default preferences file")
  155.     (help        @copyfiles-help)
  156.     (source       "streamerprefs.xml")
  157.     (dest        "ENVARC:")
  158.     (optional    force askuser)
  159.     (pattern     "#?")
  160. )
  161. ))
  162.  
  163. ; Copy the documentation
  164.  
  165. (copyfiles
  166.     (prompt        "Installing the Streamer documentation")
  167.     (help        @copyfiles-help)
  168.     (source       "docs")
  169.     (dest        (tackon #docdest "Streamer2-docs"))
  170.     (all)
  171.     (infos)
  172.     (optional    force askuser)
  173. )
  174.  
  175. ; Copy language files
  176.  
  177. (if (BITAND #langs 2)(
  178. (copyfiles
  179.     (prompt        "Installing German Language")
  180.     (help        @copyfiles-help)
  181.     (source       "streamer2-deutsch.catalog")
  182.     (dest "locale:catalogs/deutsch/")
  183.     (newname "streamer2.catalog")
  184.     (optional    force askuser)
  185.     (pattern     "#?.catalog")
  186. )))
  187. (if (BITAND #langs 4)(
  188. (copyfiles
  189.     (prompt        "Installing Turkish Language")
  190.     (help        @copyfiles-help)
  191.     (source       "streamer2-turkish.catalog")
  192.     (dest "locale:catalogs/Türkçe/")
  193.     (newname "streamer2.catalog")
  194.     (optional    force askuser)
  195.     (pattern     "#?.catalog")
  196. )))
  197. (if (BITAND #langs 8)(
  198. (copyfiles
  199.     (prompt        "Installing Polish Language")
  200.     (help        @copyfiles-help)
  201.     (source       "streamer2-polski.catalog")
  202.     (dest "locale:catalogs/Polski/")
  203.     (newname "streamer2.catalog")
  204.     (optional    force askuser)
  205.     (pattern     "#?.catalog")
  206. )))
  207. (set #confaweb (askbool
  208.     (prompt "Do you want to configure Aweb to use Streamer2?\nThis will start Aweb, configure it, and close it again.")
  209.     (help "Configuring Aweb\n\nThis option will set Aweb's MIME types so that MPEG and RealAudio streams will automatically get played by Streamer")
  210.     ))
  211.  
  212. ;Begin configuring Aweb (or not!)
  213.  
  214. (if (= #confaweb 1)(set #Awebprog (askfile
  215.     (prompt "Please choose the Aweb executable")
  216.     (help "Choose the Aweb executable \n\n Pick the porgram file that launches the Aweb web browser. Installer will launch the browser so it can use its' Arexx interface to add the MIME type configuration.")
  217.     (default "Aweb3:Aweb-II")
  218. )))
  219. (if (= #confaweb 1)(rexx "mimecfg-aweb.rexx" #Awebprog (tackon #progdest "streamer2")))
  220.  
  221.  
  222. ;(set @default-dest "SYS:")
  223.  
  224. (exit)
  225.